<?php
include $_SERVER['DOCUMENT_ROOT'].'HelmesWorkTest/backend/database/Constants.php';
/**
 * Description of DatabaseConnection
 *
 * @author Reinowin7
 */
class DatabaseConnection 
{

    static function getConnection()
    {
        $dbConnection = mysql_connect(DB_SERVER_NAME, DB_USERNAME, 
        DB_PASSWORD);
        if (!$dbConnection)
        {
            //die("Connecting with a database was unsuccessful: " . mysql_error());
            return null;
        }


        $personSectorInvolvementDB = mysql_select_db(DB_NAME, $dbConnection);
        if (!$personSectorInvolvementDB)
        {
            return null;
            //die("There is no such database in database system: " . mysql_error());   
        }
        
        return $dbConnection;
    }
}

?>
